package com.wn.system;

import feign.Logger;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;

/**
 * @author yellow Docter
 * @date 2024-09-03
 * @desc 蜗牛创想：www.woniuxy.com
 */
@EnableFeignClients("com.wn.sddfp.client.bank")  //开启 feignClient把  (TradeLogApi 接口扫入到IOC容器中)
@MapperScan("com.wn.system.mapper")
@ComponentScan({
        "com.wn.common",   //扫描 异常
        "com.wn.system",    // 正常扫描controller
        "com.wn.sddfp.client.bank.fallback"
})
@SpringBootApplication
public class SystemApplication {

    public static void main(String[] args) {
        SpringApplication.run(SystemApplication.class,args);
    }

    /**
     * openfeign通讯日志, 查看根据日志级别显示日志内容
     */
    @Bean
    public Logger.Level loggingLevel(){
        return Logger.Level.FULL;
    }

}